package com.automannn.sso;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author automannn@163.com
 * @time 2019/6/27 16:54
 */
@SpringBootApplication
@RestController
@EnableOAuth2Sso
public class App {

    @GetMapping("user")
    public Authentication user(Authentication user){
        return user;
    }


    public static void main(String[] args) {
        SpringApplication.run(App.class);
    }

}
